/*
 * @Author: dingyuwen ding_yuwen@163.com
 * @Date: 2023-05-23 15:12:30
 * @LastEditTime: 2023-11-10 10:22:58
 * @LastEditors: DingYuwen 43669762+DingYuwen@users.noreply.github.com
 * @Description:
 */
import { Flex } from '@chakra-ui/react';
// import { useFullscreen } from 'ahooks';
import { PropsWithChildren, useRef } from 'react';
import Header from './Header';
export default function AppBackground({
  children,
  withBanner,
}: PropsWithChildren<{ withBanner?: boolean }>) {
  const ref = useRef(null);
  // const [_, { toggleFullscreen }] = useFullscreen(ref);
  return (
    <Flex flexDir="column" minH="100vh" ref={ref} bg="white">
      {withBanner && (
        <Header />
      )}
      {children}
    </Flex>
  );
}
